package org.dromara.vehicle.modules.carApply.domain.bo;

import org.dromara.vehicle.modules.carApply.domain.CarApply;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 用车申请业务对象 car_apply
 *
 * @author ckk
 * @date 2025-06-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = CarApply.class, reverseConvertGenerate = false)
public class CarApplyBo extends BaseEntity {

    /**
     * 主键
     */
    private Long id;

    /**
     * 用车事由
     */
    @NotNull(message = "用车事由不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer useReason;

    /**
     * 用车类型
     */
    @NotNull(message = "用车类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer carType;

    /**
     * 预计用车开始时间
     */
    @NotNull(message = "预计用车开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date startTime;

    /**
     * 预计用车结束时间
     */
    @NotNull(message = "预计用车结束时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date endTime;

    /**
     * 用车地点
     */
    @NotBlank(message = "用车地点不能为空", groups = { AddGroup.class, EditGroup.class })
    private String usePlace;

    /**
     * 预估里程数(km)
     */
    @NotNull(message = "预估里程数(km)不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer estimatedMileage;

    /**
     * 预计费用(元)
     */
    @NotNull(message = "预计费用(元)不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal estimatedCost;

    /**
     * 附件
     */
    private String attachment;

    /**
     * 审批状态
     */
    private String status;


}
